﻿@{
    ViewBag.Title = "Template";
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>伙办</title>
    <link rel="shortcut icon" href="/static/hbweb/images/iconTitle.ico" type="image/x-icon" />
    <script src="~/Content/jquery.min.js"></script>
    <link href="~/static/base.css" rel="stylesheet" />
    <link href="~/static/reset.css" rel="stylesheet" />
    <link href="~/static/partnerWork.css" rel="stylesheet" />
    <link href="~/static/select.css" rel="stylesheet" />
    <link href="~/static/collect.css" rel="stylesheet" />
    <link href="~/static/glob_icon.css" rel="stylesheet" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Content/bootstrap.min.js"></script>
    <style>
        #ma {
            width: 70px;
            height: 33px;
            font-size: 22px;
            text-align: center;
            line-height: 30px;
            display: inline-block;
            border: 1px solid #ccc;
        }
    </style>
</head>
<body>
    <div>
        <!-- 头部开始部分-->
        <div class="container" id="head">
            <div class="header overHid">
                <a class="logo" href="/Partner/PartnerIndex"><img src="/static/hbweb/images/logo.png" alt="" /></a>
                <ul class="titleNav clearfix">
                    <li><a href="/Partner/PartnerIndex">首页</a></li>
                    <li><a href="/Partner/PartnerWork">伙办办公</a></li>
                    <li><a href="/Partner/PartnerApartment">伙办公寓</a></li>
                    <li><a href="/Partner/PartnerShop">伙办商铺</a></li>
                    <li><a href="/Partner/map">地图找房</a></li>
                    <li><a href="/Partner/officeService">办公服务</a></li>
                </ul>
                <div class="search">
                    <div id="loginner">
                        @if (@Session["LoginUserName"] == null)
                        {
                            <div class="index-login" id="LandR" style="color:#A8ADB9">
                                <a style="text-decoration:none;" href="javascript:void(0);" id="login" data-toggle="modal" data-target="#userLogin" class="login-link fn-font-clor-black">
                                    <i class="icon-person1 pa"></i> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    登录
                                </a>
                                &nbsp;
                                <i class="crow-line"></i>
                                &nbsp;
                                <a style="text-decoration:none;" href="javascript:void(0);" id="register" data-toggle="modal" data-target="#userRegist" class="register fn-font-clor-black">注册</a>
                            </div>
                        }
                        else
                        {
                            <div class="index-login" id="LandR" style="color:#A8ADB9">
                                <a href="/Partner/MyCenter" id="login" data-toggle="modal" style="color:#A8ADB9;text-decoration:none;" class="login-link fn-font-clor-black">
                                    <i class="icon-person1 pa"></i> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    欢迎 @Session["LoginUserName"] 登录!
                                </a>
                                &nbsp;
                                <i class="crow-line"></i>
                                &nbsp;
                                <a style="text-decoration:none;" href="javascript:void(0);" onclick="zhuxiao()" class="register fn-font-clor-black">注销</a>
                            </div>
                        }
                    </div>
                    <div class="header-right pr">
                        <div style="line-height: 37px">
                            <input type="text" id="HouseName" placeholder="楼盘名称查询" />
                        </div>
                        <a class="search-link" href="#">
                            <i class="icon-fangzi" id="HouseSearch" style="position:absolute;bottom:1px;"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- 头部结束-->
        @RenderBody()

        <!--底部开始-->
        <div class="footer">
            <div class="container">
                <div class="clearfix">
                    <dl style="margin-left: 0">
                        <dt>关于伙办</dt>
                        <dd><a href="/Footer/AboutUs">关于我们</a></dd>
                        <dd><a href="/Footer/JobOpportunities">工作机会</a></dd>
                        <dd><a href="/Footer/News">新闻</a></dd>
                    </dl>
                    <dl>
                        <dt>我们的服务</dt>
                        <dd><a class="pr bdbnone" data-toggle="modal" id="weituozhaofang2">委托找房</a></dd>
                        <dd><a class="pr mianfei" data-toggle="modal" id="mianfeifabu2">免费发布</a></dd>
                        <dd><a href="/Partner/officeService">办公服务</a></dd>
                        <!--<dd><a href="huobanWork/partServerIndex.html">金融服务</a></dd>-->
                        <!--<dd><a href="">预约看房</a></dd>-->
                    </dl>
                    <dl>
                        <dt>帮助中心</dt>
                        <dd><a href="/Footer/CommonQuestions">常见问题</a></dd>
                        <dd><a href="/Footer/RentProblem">租金问题</a></dd>
                    </dl>
                    <div class="erm" style="margin-left:0;">
                        <div class="clearfix erm-box" style="width:350px;">
                            <div class="fl">
                                <span style="color:#A8ADB9 ">下载伙办App</span>
                                <br />
                                <br />
                                <img src="/static/hbweb/images/erweima1.png" alt="" />
                            </div>
                            <div class="fr">
                                <span style="color:#A8ADB9 ">关注微信公众号</span>
                                <br />
                                <br />
                                <img src="/static/hbweb/images/erweima2.png" alt="" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="footer-text">
                    <p class="pr"><i class="icon-envelop pa" style="top: 4px;left: -30px"></i>support@huoban.com</p>
                </div>
            </div>
            <div class="bottom">
                <div class="container">
                    <p class="fl">吉林伙办地产经济有限公司 京ICP备 06000607 Copyright 2008-2016 ele.me. All Rights Reserved</p>
                    <!--<a href="#" class="fr">网站地图</a>-->
                    <!--<a href="#" class="fr">条款与隐私</a>-->
                </div>
            </div>
        </div>
        <!--底部结束-->
    </div>

    <!-- 悬浮 免费发布 委托找房-->
    <ul class="right-sidebar" id="right-nav">
        <li><a href="#" class="pr mianfei" data-toggle="modal" id="mianfeifabu"><i class="icon-fabu pa" style="top: 10px;left: 23px"></i>免费发布</a></li>
        <li><a href="#" class="pr bdbnone" data-toggle="modal" id="weituozhaofang"><i class="icon-hand pa" style="top: 10px;left: 23px"></i>委托找房</a></li>
    </ul>

    <!--弹出登录-->
    <div class="modal fade" id="userLogin" data-backdrop="false" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLable" aria-hidden="true" style="margin-top:10%;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" style="color:blue;">登录</h4>
                    <span><a data-toggle="modal" data-target="#myModal2" onclick="send()">忘记密码,请点击我</a></span>
                </div>
                <div class="modal-body">
                    <table>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" disabled="true" type="button">
                                                            用户名：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="text" class="form-control" id="txtName">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" disabled="true" type="button">
                                                            密&nbsp;&nbsp;&nbsp;码：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="password" class="form-control" id="txtPwd">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <button class="btn btn-default" disabled="true" style="float:left;" type="button">
                                        验证码：
                                    </button>
                                    <input style="width:128px; float:left;" id="yzm" type="text" class="form-control"><a href="#" onclick="createCode()" class="huan"><span id="ma"></span></a><br>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="login()">登录</button>
                </div>
            </div>
        </div>
    </div>

    <!--弹出注册-->
    <div class="modal fade" id="userRegist" data-backdrop="false" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLable" aria-hidden="true" style="margin-top:3%;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" style="color:blue;">注册</h4>
                </div>
                <div class="modal-body">
                    <table>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button disabled class="btn btn-default" type="button">
                                                            &nbsp;&nbsp;  用户名：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="text" class=" form-control" id="regName">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button disabled class="btn btn-default" type="button">
                                                            &nbsp;&nbsp;  手机号：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="text" onkeyup="Regist_Use_Telphone()" class="form-control" id="regTel">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button disabled class="btn btn-default" type="button">
                                                            &nbsp;&nbsp;&nbsp; 密&nbsp;&nbsp;&nbsp;码：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="text" class="form-control" id="regPwd">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" disabled="disabled" type="button">
                                                            真实姓名：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="text" class="form-control" id="Use_ReallyName">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="padding: 20px 150px 10px;">
                                    <form class="bs-example bs-example-form" role="form">
                                        <div class="row">
                                            <div class="col-lg-3">
                                                <div class="input-group">
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" disabled="disabled" type="button">
                                                            身份证号：
                                                        </button>
                                                    </span>
                                                    <input style="width:200px;" type="text" class="form-control" id="Use_IdCard">
                                                </div><!-- /input-group -->
                                            </div><!-- /.col-lg-6 -->
                                        </div><!-- /.row -->
                                    </form>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="regist()">注册</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 文本框样式 -->
    <style>
        .tdbox input {
            width: 200px;
            height: 38px;
        }
    </style>

    <!--免费发布-->
    <div class="modal fade" id="publish" data-backdrop="false" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLable" aria-hidden="true" style="margin-top:5%;">
        <div class="modal-dialog" style="width:650px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title">发布房源</h4>
                </div>
                <form action="/Partner/SendHouse">
                    <div class="modal-body">
                        <table cellspacing="10" cellpadding="0" border="0">
                            <tr>
                                <td>
                                    <div class="tdbox">
                                        <input name="House_Name" type="text" class="form-control" placeholder="房源名称" id="House_Name">
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox">
                                        <input name="House_Intro" type="text" class="form-control" placeholder="房源简介" id="House_Intro">
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox short-tdbox pr">
                                        <select name="House_Type" class="form-control" style="width:200px;">
                                            <option value="">房源类型（户型）</option>
                                            <option value="伙办办公">写字楼</option>
                                            <option value="伙办商铺">商铺</option>
                                            <option value="伙办公寓">公寓</option>
                                        </select>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_Area" type="text" class="form-control" placeholder="面积（平方米）" maxlength='10' id="House_Area">
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_Price" type="text" class="form-control" placeholder="租金（千元/月）" maxlength='10' id="House_Price">
                                        </p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_FreeLease" type="text" class="form-control" placeholder="免租期（月）" maxlength='10' id="House_FreeLease">
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_EarlyRentDate" type="date" class="form-control" placeholder="最早可租日期" maxlength='10' id="House_EarlyRentDate">
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_ShortRentDate" type="text" class="form-control" placeholder="最短租期（年）" maxlength='10' id="House_ShortRentDate">
                                        </p>
                                    </div>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_FloorCount" type="text" class="form-control" placeholder="楼层" maxlength='10' id="House_FloorCount">
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_FloorHigh" type="text" class="form-control" placeholder="层高（米）" maxlength='10' id="House_FloorHigh">
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox short-tdbox pr">
                                        <select name="House_Decorate" class="form-control" style="width:200px;">
                                            <option value="">装修程度（情况）</option>
                                            <option>毛坯</option>
                                            <option>简装修</option>
                                            <option>精装修</option>
                                            <option>吊白网</option>
                                            <option>遗留装修</option>
                                        </select>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_Person" type="text" class="form-control" placeholder="联系人" maxlength='10' id="House_Person">
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="House_Telphone" type="text" class="form-control" placeholder="联系方式" maxlength='11' id="House_Telphone">
                                        </p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="tdbox pr">
                                        <select name="Province" class="form-control" style="width:200px;" onchange="bindCityList()" id="provinceId">
                                            <option value="">省</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    <select name="City" class="form-control" style="width:200px;" onchange="bindAreaList()" id="cityId">
                                        <option value="">城市</option>
                                    </select>
                                </td>
                                <td>
                                    <select name="Area" class="form-control" style="width:200px;" id="areaId">
                                        <option value="">区域</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" class="tdbox" style="width: 617px">
                                    <input name="House_Address" type="text" class="form-control" placeholder="详细地址" maxlength='50' id="House_Address" style="width:612px;">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="submit" class="btn btn-primary" onclick="return check(this.form)">发布</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!--委托找房-->
    <div class="modal fade" id="entrust" data-backdrop="false" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLable" aria-hidden="true" style="margin-top:5%;">
        <div class="modal-dialog" style="width:650px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title">委托找房</h4>
                </div>
                <form action="/Partner/FindHouse">
                    <div class="modal-body">
                        <table cellspacing="10" cellpadding="0" border="0">
                            <tr>
                                <td>
                                    <div class="tdbox pr">
                                        <select name="E_Type" class="form-control" style="width:200px;">
                                            <option>房源类型（户型）</option>
                                            <option value="伙办办公">写字楼</option>
                                            <option value="伙办商铺">商铺</option>
                                            <option value="伙办公寓">公寓</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox pr">
                                        <select name="E_Decorate" class="form-control" style="width:200px;">
                                            <option>装修程度（情况）</option>
                                            <option>毛坯</option>
                                            <option>简装修</option>
                                            <option>精装修</option>
                                            <option>吊白网</option>
                                            <option>遗留装修</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox pr">
                                        <div class="short-select">
                                            <select name="E_Area" class="form-control" style="width:200px;">
                                                <option>期望面积（平方米）</option>
                                                <option value="小于100">< 100</option>
                                                <option>100-200</option>
                                                <option>200-300</option>
                                                <option>300-500</option>
                                                <option>500-100</option>
                                                <option value="大于1000">>1000</option>
                                            </select>
                                        </div>
                                    </div>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <div class="tdbox pr">
                                        <select name="Province2" class="form-control" style="width:200px;" onchange="bindCityList2()" id="provinceId2">
                                            <option>省</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    <select name="City" class="form-control" style="width:200px;" onchange="bindAreaList2()" id="cityId2">
                                        <option>城市</option>
                                    </select>
                                </td>
                                <td>
                                    <select name="Area" class="form-control" style="width:200px;" id="areaId2">
                                        <option>区域</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="tdbox pr">
                                        <select name="E_Price" class="form-control" style="width:200px;">
                                            <option>租金（千元/月）</option>
                                            <option value="0-1000">< 1</option>
                                            <option value="1000-3000">1-3</option>
                                            <option value="3000-5000">3-5</option>
                                            <option value="5000-8000">5-10</option>
                                            <option value="10000"> >10</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox pr">
                                        <div class="short-select">
                                            <select name="E_HopeSell" class="form-control" style="width:200px;">
                                                <option>期望售价（元）</option>
                                                <option value="小于6000">< 6000</option>
                                                <option>6000-8000</option>
                                                <option>8000-10000</option>
                                                <option>10000-13000</option>
                                                <option>13000-15000</option>
                                                <option>15000-20000</option>
                                                <option value="大于20000">> 20000</option>
                                            </select>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <div class="tdbox overHid">
                                        <p>
                                            <input name="E_Telphone" type="text" class="form-control" placeholder="联系方式" maxlength='11' id="E_Telphone">
                                        </p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="tdbox" colspan="3">
                                    <input name="E_Remark" type="text" class="form-control" placeholder="留言" maxlength='100' id="ps" style="width:612px;margin-top:10px;">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="submit" class="btn btn-primary" onclick="return find(this.form)">立即找房</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- 模态框 修改密码（Modal） -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">
                        ×
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        修改密码    &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;
                    </h4>
                </div>
                <!--修改密码-->
                <div>
                    <table>
                        <tr>
                            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                            <td style="font-size:16px;">请输入旧密码</td>
                            <td style="text-align:left;"><input style="margin-left:66px;" class="form-control" id="OldPwd" type="text" /></td>
                        </tr>
                        <tr>
                            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                            <td style="font-size:16px;text-align:right;">请输入新密码</td>
                            <td style="text-align:left;"><input style="margin-left:66px;" class="form-control" id="NewPwd" type="text" /></td>
                        </tr>
                    </table>
                </div>
                <!--代码块结束-->
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">
                        关闭
                    </button>
                    <button type="button" id="MakeSuce" class="btn btn-primary">
                        确定
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!--修改密码框结束-->
    <!-- 模态框 找回密码（Modal） -->
    <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">
                        ×
                    </button>
                    <h4 class="modal-title">
                        您正在找回密码
                    </h4>
                </div>
                <!--找回-->
                <div>
                    <table>
                        <tr>
                            <td style="font-size:20px;">请输入账户名称</td>
                            <td><input style="margin-left:66px;" id="FindName" class="form-control" type="text" /></td>
                        </tr>
                        <tr>
                            <td style="font-size:20px;">请输入注册时的手机号</td>
                            <td><input style="margin-left:66px;" id="FindPhone" class="form-control" type="text" /></td>
                        </tr>
                    </table>
                </div>
                <!--代码块结束-->
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">
                        关闭
                    </button>
                    <button type="button" id="FindPwd" class="btn btn-primary">
                        找回密码
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!--我用来接收值的-->
    <input type="hidden" id="i" />
    <input type="hidden" id="GetLoginName" value="@Session["LoginUserName"]" />
    <!--找回密码框结束-->
    <!--楼盘查询-->
    <script>
        $("#HouseSearch").click(function () {
            //要查询的楼盘名称
            var House_Name = $("#GetLoginName").val();
            if (House_Name == "" || House_Name == null) {
                layer.tips('您还没有登录。', '#GetLoginName', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#GetLoginName").focus();
                //alert("您还没有登录!");
            }
            else {
                var Name = $("#HouseName").val();
                location.href = '/HouseMessage/HouseSearch?House_Name=' + Name;
            }
        });
    </script>

    <!-- 登录 注册 手机号验证 -->
    <script>
        $(function () {
            document.onkeydown = function (e) {
                var ev = document.all ? window.event : e;
                if (ev.keyCode == 13) {
                    login();
                }
            }
        })
        //判断是否登录   用来发布房源和委托找房
        var LName = $("#GetLoginName").val();
        $("#mianfeifabu").click(function () {
            if (LName == null || LName == "") {
                layer.tips('您还没有登录。', '#mianfeifabu', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#mianfeifabu").focus();
                //alert("请先登录!");
                return;
            }
            else {
                $("#mianfeifabu").attr("data-target", "#publish");
            }
        })
        $("#weituozhaofang").click(function () {
            if (LName == null || LName == "") {
                layer.tips('您还没有登录。', '#weituozhaofang', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#weituozhaofang").focus();
                return;
            }
            else {
                $("#weituozhaofang").attr("data-target", "#entrust");
            }
        })
        $("#mianfeifabu2").click(function () {
            if (LName == null || LName == "") {
                layer.tips('您还没有登录。', '#mianfeifabu2', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#mianfeifabu2").focus();
                return;
            }
            else {
                $("#mianfeifabu2").attr("data-target", "#publish");
            }
        })
        $("#weituozhaofang2").click(function () {
            if (LName == null || LName == "") {
                layer.tips('您还没有登录。', '#weituozhaofang2', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#weituozhaofang2").focus();
                return;
            }
            else {
                $("#weituozhaofang2").attr("data-target", "#entrust");
            }
        })

        // 登录
        function login() {
            var name = $("#txtName").val();
            var pwd = $("#txtPwd").val();
            var yzm = $("#yzm").val();
            if (name == "" || pwd == "" || yzm == "") {
                if (name == "") {
                    layer.tips('请输入账号。', '#txtName', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#txtName").focus();
                    return;
                }
                if (pwd == "") {
                    layer.tips('请输入密码。', '#txtPwd', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#txtPwd").focus();
                    return;
                }
                if (yzm == "") {
                    layer.tips('请输入验证码。', '#yzm', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#yzm").focus();
                    return;
                }
            }
            else {
                $.ajax({
                    type: "post",
                    url: "/Login/Use_Login",
                    data: { Use_Name: name, Use_Pwd: pwd },
                    success: function (result) {
                        if (result == "nameWrong") {
                            alert("用户名不存在!");
                            createCode();
                            return;
                        }
                        if (result == "pwdWrong") {
                            alert("密码输入错误!");
                            createCode();
                            return;
                        }
                        if (result == "wrong") {
                            alert("该用户被禁用!");
                            createCode();
                            return;
                        }
                        else {
                            layer.alert('登陆成功', {
                                icon: 1,
                                title: "提示",
                            }, function () {
                                location.href = "/Partner/PartnerIndex";
                            });
                        }
                    }
                })
            }

            if (yzm.toUpperCase() != code.toUpperCase()) {
                layer.tips('验证码不正确。', '#yzm', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#yzm").focus();
                return;
            }
        }

        //进行手机号验证
        function Regist_Use_Telphone() {
            var reg = /^1[3|4|5|8]\d{9}$/;
            var phone = $("#regTel").val();
            if (!reg.test(phone)) {
                $("#regTel").css("border", "2px solid red");
                $("#i").val(1);
            }
            else {
                $("#regTel").css("border", "2px solid #66ccff");
                $("#i").val(2);
            }
        }

        // 注册
        function regist() {
            var name = $("#regName").val();
            var pwd = $("#regPwd").val();
            var tel = $("#regTel").val();
            var Use_IdCard = $("#Use_IdCard").val();
            var Use_ReallyName = $("#Use_ReallyName").val();
            var china = /^[\u4e00-\u9fa5]{2,4}$/;
            var password = /^[A-Za-z0-9]{6,16}$/;
            var idcard = /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/;
            if (name == "" || tel == "" || pwd == "" || Use_IdCard == "") {
                if (name == "") {
                    layer.tips('请输入用户名', '#regName', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#regName").focus();
                    return;
                }
                if (pwd == "") {
                    layer.tips('请输入密码', '#regPwd', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#regPwd").focus();
                    return;
                }
                if (tel == "") {
                    layer.tips('请输入电话', '#regTel', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#regTel").focus();
                    return;
                }
                if (Use_IdCard == "") {
                    layer.tips('请输入电话', '#Use_IdCard', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#Use_IdCard").focus();
                    return;
                }
            }
            else if (!china.test(Use_ReallyName)) {
                layer.tips('格式不正确', '#Use_ReallyName', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#Use_ReallyName").focus();
            }
            else if (!password.test(pwd)) {
                layer.tips('密码应为6-16为字符，包括字母数字下划线', '#regPwd', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#txtPwd").focus();
            }
            else if (!idcard.test(Use_IdCard)) {
                layer.tips('身份证格式不正确', '#Use_IdCard', {
                    tips: [1, 'red'],
                    time: 2000
                });
                $("#Use_IdCard").focus();
            }

            else {
                var reg = /^1[3578]\d{9}$/;
                var phone = $("#regTel").val();
                if (!reg.test(phone)) {
                    layer.tips('电话格式不正确', '#regTel', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                    $("#regTel").focus();
                }
                else {
                    $.ajax({
                        type: "post",
                        url: "/Login/Use_Register",
                        data: { Use_Name: name, Use_Pwd: pwd, Use_Telphone: tel, Use_Role: 2, IsUse: 1, Use_ReallyName: Use_ReallyName, Use_IdCard: Use_IdCard },
                        success: function (result) {
                            if (result == 100) {
                                alert('该用户名已被注册！')

                            }
                            else if (result == 101) {
                                alert("您的手机号已被注册!");
                            }
                            else {
                                if (result > 0) {
                                    layer.alert('注册成功', {
                                        icon: 1,
                                        title: "提示",
                                    }, function () {
                                        location.href = "/Partner/PartnerIndex";
                                    });
                                }
                                else {
                                    alert("注册失败!");
                                }
                            }
                        }
                    })
                }
            }
        }
        //注销
        function zhuxiao() {
            layer.confirm('是否注销?', { icon: 3, title: '提示' }, function () {
                $.ajax({
                    type: "post",
                    url: "/Login/returnLogin",
                    success: function (result) {
                        if (result == 1) {
                            layer.alert('注销成功', {
                                icon: 1,
                                title: "提示",
                            }, function () {
                                window.location.reload();
                            });
                        }
                    }
                })
                layer.close(index);
            });
        }
    </script>

    <!-- 免费发布 三级联动 -->
    <script>
        //页面加载
        bindProvinceList();
        //绑定省
        function bindProvinceList() {
            $.ajax({
                type: "post",
                url: "/Partner/BindProvince",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#provinceId").empty();
                        $("#provinceId").append("<option value=''>省</option>");
                        for (var i = 0; i < data.length; i++) {
                            $("#provinceId").append("<option value='" + data[i].C_Name + "'>" + data[i].C_Name + "</option>");
                        }
                        bindCityList();
                    }
                }
            })
        }
        //绑定市
        function bindCityList() {
            var Proname = $("#provinceId").val();
            $.ajax({
                type: "post",
                url: "/Partner/BindCity/?Proname=" + Proname,
                //data: { ProId: ProId },
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#cityId").empty();
                        $("#cityId").append("<option value=''>市</option>");
                        for (var i = 0; i < data.length; i++) {
                            $("#cityId").append("<option value='" + data[i].C_Name + "'>" + data[i].C_Name + "</option>");
                        }
                        bindAreaList();
                    }
                }
            })
        }
        //绑定区
        function bindAreaList() {
            var Cityname = $("#cityId").val();
            $.ajax({
                type: "post",
                url: "/Partner/BindArea/?Cityname=" + Cityname,
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#areaId").empty();
                        $("#areaId").append("<option value=''>区</option>");
                        for (var i = 0; i < data.length; i++) {
                            $("#areaId").append("<option value='" + data[i].C_Name + "'>" + data[i].C_Name + "</option>");
                        }
                    }
                }
            })
        }
    </script>

    <!-- 委托找房 三级联动 -->
    <script>
        //页面加载
        bindProvinceList2();
        //绑定省
        function bindProvinceList2() {
            $.ajax({
                type: "post",
                url: "/Partner/BindProvince",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#provinceId2").empty();
                        $("#provinceId2").append("<option value=''>省</option>");
                        for (var i = 0; i < data.length; i++) {
                            $("#provinceId2").append("<option value='" + data[i].C_Name + "'>" + data[i].C_Name + "</option>");
                        }
                        bindCityList2();
                    }
                }
            })
        }
        //绑定市
        function bindCityList2() {
            var ProId2 = $("#provinceId2").val();
            $.ajax({
                type: "post",
                url: "/Partner/BindCity/?Proname=" + ProId2,
                //data: { ProId: ProId },
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#cityId2").empty();
                        $("#cityId2").append("<option value=''>市</option>");
                        for (var i = 0; i < data.length; i++) {
                            $("#cityId2").append("<option value='" + data[i].C_Name + "'>" + data[i].C_Name + "</option>");
                        }
                        bindAreaList2();
                    }
                }
            })
        }
        //绑定区
        function bindAreaList2() {
            var CityId2 = $("#cityId2").val();
            $.ajax({
                type: "post",
                url: "/Partner/BindArea/?Cityname=" + CityId2,
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data != null) {
                        $("#areaId2").empty();
                        $("#areaId2").append("<option value=''>区</option>");
                        for (var i = 0; i < data.length; i++) {
                            $("#areaId2").append("<option value='" + data[i].C_Name + "'>" + data[i].C_Name + "</option>");
                        }
                    }
                }
            })
        }
    </script>

    <script src="~/Content/layer/2.4/layer.js"></script>
    <!--修改密码Script-->
    <script>
        $("#MakeSuce").click(function () {
            var OldPwd = $("#OldPwd").val();
            var NewPwd = $("#NewPwd").val();

            if (OldPwd == "" || NewPwd == "") {
                alert("信息为空，无法执行操作");
                return;
            }
            else if (NewPwd == OldPwd) {
                alert("新密码不能与旧密码一样一样的。")
                return;
            }
            else {
                $.ajax({
                    type: "Post",
                    url: "/UserCenter/PasswordManage",
                    data: { OldPwd: OldPwd, NewPwd: NewPwd },
                    success: function (obj) {
                        if (obj == 101) {
                            alert("旧密码输入错误!");
                            return;
                        }
                        else if (obj == 102) {
                            alert("操作失败!");
                            return;
                        }
                        else if (obj > 0) {
                            alert("修改成功!");
                            window.location.reload();
                        }
                    }
                })
            }
        })
    </script>
    <!--修改密码Script结束-->
    <!--找回密码-->
    <script>
        $("#FindPwd").click(function () {
            var FindName = $("#FindName").val();
            var FindPhone = $("#FindPhone").val();

            if (FindName == "" || FindPhone == "") {
                alert("找回条件不能为空!");
                return;
            }
            else {
                $.ajax({
                    type: "Post",
                    url: "/UserCenter/FindPwd",
                    dataType: "json",
                    data: { FindName: FindName, FindPhone: FindPhone },
                    success: function (obj) {
                        obj = eval(obj);
                        if (obj != null) {
                            alert("找回成功!您的密码是" + obj.Use_Pwd + "");
                        }
                        else {
                            alert("操作失败!");
                        }
                    }
                })
            }
        })
    </script>
    <!--找回密码结束-->

    <script>
        $("#floorName").blur(function () {
            var House_Name = $("#floorName").val();
            alert(House_Name)
            if (House_Name == null || House_Name == "") {
                var s = document.getElementById("House_NameReg").innerHTML = "用户名不能为空"
            }
            else {
                var s = document.getElementById("House_NameReg").innerHTML = ""
            }
        })
    </script>

    <!--//正则验证-->
    <script>
        //房源正则
        $("#House_Name").blur(function () {
            var House_Name = $("#House_Name").val();
            if (House_Name == null || House_Name == "") {
                layer.tips('房源名称不能为空。', '#House_Name', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //房源简介正则
        $("#House_Intro").blur(function () {
            var House_Intro = $("#House_Intro").val();

            if (House_Intro == null || House_Intro == "") {
                layer.tips('房源简介不能为空。', '#House_Intro', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //面积正则
        $("#House_Area").blur(function () {
            var House_Area = $("#House_Area").val();
            var reg = /^\+?[1-9]\d*$/;
            if (!reg.test(House_Area)) {
                layer.tips('面积格式不正确。', '#House_Area', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })

        //价格正则
        $("#House_Price").blur(function () {
            var House_Price = $("#House_Price").val();
            var reg = /^(\d+\.\d{1,1}|\d+)$/;
            if (!reg.test(House_Price)) {
                layer.tips('价格格式不正确。', '#House_Price', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //免租期正则
        $("#House_FreeLease").blur(function () {
            var House_FreeLease = $("#House_FreeLease").val();
            var reg = /^\+?[1-9]\d*$/;
            if (!reg.test(House_FreeLease)) {
                layer.tips('请输入正确的租期。', '#House_FreeLease', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //日期格式正则
        $("#House_EarlyRentDate").blur(function () {
            var House_EarlyRentDate = $("#House_EarlyRentDate").val();
            var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/;
            if (!reg.test(House_EarlyRentDate)) {
                layer.tips('格式应为yyyy-mm-dd。', '#House_EarlyRentDate', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //最短租期正则
        $("#House_ShortRentDate").blur(function () {
            var House_ShortRentDate = $("#House_ShortRentDate").val();
            var reg = /^\+?[1-9]\d*$/;
            if (!reg.test(House_ShortRentDate)) {
                layer.tips('格式不正确', '#House_ShortRentDate', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //楼层正则
        $("#House_FloorCount").blur(function () {
            var House_FloorCount = $("#House_FloorCount").val();
            var reg = /^\+?[1-9]\d*$/;
            if (!reg.test(House_FloorCount)) {
                layer.tips('楼层格式不正确', '#House_FloorCount', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //层高正则
        $("#House_FloorHigh").blur(function () {
            var House_FloorHigh = $("#House_FloorHigh").val();
            var reg = /^\d+(?=\.{0,1}\d+$|$)/
            if (!reg.test(House_FloorHigh)) {
                layer.tips('层高格式不正确', '#House_FloorHigh', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //联系人正则
        $("#House_Person").blur(function () {
            var House_Person = $("#House_Person").val();
            var reg = /^[\u4e00-\u9fa5]*$/;
            var regs = /^[\u4e00-\u9fa5]{2,4}$/;
            if (House_Person == null || House_Person == "") {
                layer.tips('联系人不能为空', '#House_Person', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
            else if (!reg.test(House_Person)) {
                layer.tips('联系人格式不正确', '#House_Person', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
            else {
                if (!regs.test(House_Person)) {
                    layer.tips('请输入2到4位汉字', '#House_Person', {
                        tips: [1, 'red'],
                        time: 2000
                    });
                }
            }
        })
        //手机正则
        $("#House_Telphone").blur(function () {
            var House_Telphone = $("#House_Telphone").val();
            var reg = /^1[3578]\d{9}$/;
            if (!reg.test(House_Telphone)) {
                layer.tips('手机格式不正确', '#House_Telphone', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })

        //地址正则
        $("#House_Address").blur(function () {
            var House_Address = $("#House_Address").val();

            if (House_Address == null || House_Address == "") {
                layer.tips('详细地址不能为空', '#House_Address', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //联系方式正则
        $("#E_Telphone").blur(function () {
            var E_Telphone = $("#E_Telphone").val();
            var reg = /^1[3578]\d{9}$/;
            if (!reg.test(E_Telphone)) {
                layer.tips('请输入正确的手机号', '#E_Telphone', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
        //备注信息正则
        $("#E_Remark").blur(function () {
            var E_Remark = $("#E_Remark").val();

            if (E_Remark == null || E_Remark == "") {
                layer.tips('备注信息不能为空', '#E_Remark', {
                    tips: [1, 'red'],
                    time: 2000
                });
            }
        })
    </script>

    <!--数组验证码-->
    <script>
        var code;
        createCode();
        function createCode() {
            code = "";
            var codeLength = 4; //验证码的长度
            var checkCode = document.getElementById("ma");
            var codeChars = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
                'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
                'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //所有候选组成验证码的字符，当然也可以用中文的
            for (var i = 0; i < codeLength; i++) {
                var charNum = Math.floor(Math.random() * 52);
                code += codeChars[charNum];
            }
            if (checkCode) {
                checkCode.className = "code";
                checkCode.innerHTML = code;
            }
        }
    </script>

    <!--房源发布的提交验证-->
    <script type="text/javascript">
        function check(form) {
            if (form.House_Name.value == '') {
                form.House_Name.focus();
                return false;
            }
            if (form.House_Intro.value == '') {
                form.House_Intro.focus();
                return false;
            }
            if (form.House_Type.value == '') {
                form.House_Type.focus();
                return false;
            }
            if (form.House_Area.value == '') {
                form.House_Area.focus();
                return false;
            }
            if (form.House_Price.value == '') {
                form.House_Price.focus();
                return false;
            }
            if (form.House_FreeLease.value == '') {
                form.House_FreeLease.focus();
                return false;
            }
            if (form.House_EarlyRentDate.value == '') {
                form.House_EarlyRentDate.focus();
                return false;
            }
            if (form.House_ShortRentDate.value == '') {
                form.House_ShortRentDate.focus();
                return false;
            }
            if (form.House_FloorCount.value == '') {
                form.House_FloorCount.focus();
                return false;
            }
            if (form.House_FloorHigh.value == '') {
                form.House_FloorHigh.focus();
                return false;
            }
            if (form.House_Decorate.value == '') {
                form.House_Decorate.focus();
                return false;
            }
            if (form.House_Person.value == '') {
                form.House_Person.focus();
                return false;
            }
            if (form.House_Telphone.value == '') {
                form.House_Telphone.focus();
                return false;
            }
            if (form.Province.value == '') {
                form.Province.focus();
                return false;
            }
            if (form.City.value == '') {
                form.City.focus();
                return false;
            }
            if (form.House_Address.value == '') {
                form.House_Address.focus();
                return false;
            }
            return true;
        }
    </script>
    <!--委托找房的提交验证-->
    <script type="text/javascript">
        function find(form) {
            if (form.E_Type.value == '') {
                form.E_Type.focus();
                return false;
            }
            if (form.E_Decorate.value == '') {
                form.E_Decorate.focus();
                return false;
            }
            if (form.E_Area.value == '') {
                form.E_Area.focus();
                return false;
            }
            if (form.Province2.value == '') {
                form.Province2.focus();
                return false;
            }
            if (form.City.value == '') {
                form.City.focus();
                return false;
            }
            if (form.E_Price.value == '') {
                form.E_Price.focus();
                return false;
            }
            if (form.E_HopeSell.value == '') {
                form.E_HopeSell.focus();
                return false;
            }
            if (form.E_Telphone.value == '') {
                form.E_Telphone.focus();
                return false;
            }
            if (form.E_Remark.value == '') {
                form.E_Remark.focus();
                return false;
            }
            return true;
        }
    </script>

</body>
</html>
